package trlygjj.tanruiliyigenjinjin.web.controller;

import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by user on 2018/7/15.
 */
@Controller
public class LogoutController {
    @RequestMapping("logout")
    public String logout(){
        /*HttpSession session = (HttpSession) SecurityUtils.getSubject().getSession();
        session.invalidate();*/
        SecurityUtils.getSecurityManager().logout(SecurityUtils.getSubject());
        return "forward:/login.jsp";
    }
}
